var assert = require('node-assert-extras');
var mResponse = require(__testRoot + '/model/ResponseEntity');

/**
 * ResponseHooks Control Testing
 * @author jmanero
 */
suite("Response Entity", function() {
	test("Client Error", function() {
		var res = new mResponse().clientError(100, "Message");
		assert.equal(400, res.response.code, "Invalid Response Code");
		assert.equal("error", res.response.status, "Invalid Response Status");
		assert.equal(100, res.response.error.code, "Invalid Error Code");
		assert.equal("Message", res.response.error.message, "Invalid Error Message");
	});
	
	test("Server Error", function() {
		var res = new mResponse().serverError(100, "Message");
		assert.equal(500, res.response.code, "Invalid Response Code");
		assert.equal("error", res.response.status, "Invalid Response Status");
		assert.equal(100, res.response.error.code, "Invalid Error Code");
		assert.equal("Message", res.response.error.message, "Invalid Error Message");
	});
});
